package com.formssi.pojo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @description:
 * @author: ajims
 * @time: 2021/6/24 9:41
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Validated
public class User2 {

    //JSR-303规范
    private int id;
    @NotNull(message = "姓名不能为空！")
    private String name;
    @Range(min=0, max=150)
    private int age;
    @Length(min=11, max=11)
    private String phone;
    private String sex;
    private Date birthday;
    private String address;
    @Email
    private String email;
    private String college;
    private String major;
    private Date instData;
    private Date modiTime;

}
